using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsQuestions: BusinessObjectBase
	{

		public ClsQuestions() {}

		#region InnerClass
		public enum ClsQuestionsFields
		{
			QuestionID,
			QuestionName,
			Description,
			Tags,
			Media,
			Likes,
			Wiki,
			UserID,
			QuizID
		}
		#endregion

		#region Data Members

			int _questionID;
			string _questionName;
			string _description;
			string _tags;
			string _media;
			int? _likes;
			string _wiki;
			int? _userID;
			int? _quizID;

		#endregion

		#region Properties

		public int  QuestionID
		{
			 get { return _questionID; }
			 set
			 {
				 if (_questionID != value)
				 {
					_questionID = value;
					 PropertyHasChanged("QuestionID");
				 }
			 }
		}

		public string  QuestionName
		{
			 get { return _questionName; }
			 set
			 {
				 if (_questionName != value)
				 {
					_questionName = value;
					 PropertyHasChanged("QuestionName");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public string  Tags
		{
			 get { return _tags; }
			 set
			 {
				 if (_tags != value)
				 {
					_tags = value;
					 PropertyHasChanged("Tags");
				 }
			 }
		}

		public string  Media
		{
			 get { return _media; }
			 set
			 {
				 if (_media != value)
				 {
					_media = value;
					 PropertyHasChanged("Media");
				 }
			 }
		}

		public int?  Likes
		{
			 get { return _likes; }
			 set
			 {
				 if (_likes != value)
				 {
					_likes = value;
					 PropertyHasChanged("Likes");
				 }
			 }
		}

		public string  Wiki
		{
			 get { return _wiki; }
			 set
			 {
				 if (_wiki != value)
				 {
					_wiki = value;
					 PropertyHasChanged("Wiki");
				 }
			 }
		}

		public int?  UserID
		{
			 get { return _userID; }
			 set
			 {
				 if (_userID != value)
				 {
					_userID = value;
					 PropertyHasChanged("UserID");
				 }
			 }
		}

		public int?  QuizID
		{
			 get { return _quizID; }
			 set
			 {
				 if (_quizID != value)
				 {
					_quizID = value;
					 PropertyHasChanged("QuizID");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("QuestionID", "QuestionID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("QuestionName", "QuestionName",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Tags", "Tags",500));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Media", "Media",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Wiki", "Wiki",500));
		}

		#endregion

	}
}
